<cfcomponent extends="net.sourceforge.cfunit.framework.TestCase">


  <cffunction name="setUp" returntype="void" access="public">
			<cfset coldSpring = createObject( 'component', 'coldspring.beans.DefaultXmlBeanFactory').init() />
			<cfset coldSpring.loadBeansFromXmlFile("/actionpacks/projectshen/tests/cs/aop.tests.cs.xml") />			
      <cfset variables.projectService = coldSpring.getBean('projectService') />
      <cfset variables.xmlRpcService = coldSpring.getBean('xmlRpcService') />
   </cffunction>

	<cffunction name="testGetAPIVersion" returntype="void" access="public">
		<cfset var results = variables.projectService.getAPIVersion()>
		<cfset assertEquals(expected="revised",actual=results) />
	</cffunction>
		
	<cffunction name="testGetProjectById" returntype="void" access="public">
		<cfset var results = variables.projectService.getProjectById(3)>
		<cfset results = isStruct(results)>
		<cfset assertEquals(expected="true",actual=results) />
	</cffunction>

	<cffunction name="testGetProjectBySafeName" returntype="void" access="public">
		<cfset var results = variables.projectService.getProjectBySafeName("actionpacks") />
		<cfset assertEquals(expected="revised",actual=results) />
	</cffunction>

	<cffunction name="testXmlRpc" returntype="void" access="public">
		<cfset var results = variables.xmlRpcService.runMethod() />
		<cfcontent type="text/html">
		<cfdump var="#results#"><cfabort />
		<cfset assertEquals(expected="revised",actual=results) />
	</cffunction>
		
</cfcomponent>